package ModelLayer;


/**
 * Write a description of class Person here.
 * 
 * @author (your name) 
 * @version (a version number or a date)
 */
public class Person
{
    // instance variables - replace the example below with your own
    private long id;
    private String name;
    private String address;
    private String postalCode;
    private String city;
    private String phoneNr;

    /**
     * Constructor for objects of class Person
     */
    public Person(long id, String name, String address, String postalCode, String city, String phoneNr)
    {
        this.id = id;
        this.name = name;
        this.address = address;
        this.postalCode = postalCode;
        this.city = city;
        this.phoneNr = phoneNr;
    }
    
    //Return Person id
    public long getId()
    {
        return id;
    }
    
    //Return person name
    public String getName()
    {
        return name;
    }
        
    //Prints all the attributes of person
    public void getInfo()
    {
        System.out.println("ID: "+id);
        System.out.println("Name: "+name);
        System.out.println("Address: "+address);
        System.out.println("Postal Code: "+postalCode);
        System.out.println("City: "+city);
        System.out.println("Phonenumber: "+phoneNr);
    }
    
    //When called, changes the attributes of the specific object
    public void changeInfo(long id, String name, String address, String postalCode,
    String city, String phoneNr)
    {
        this.id = id;
        this.name = name;
        this.address = address;
        this.postalCode = postalCode;
        this.city = city;
        this.phoneNr = phoneNr;
    }
}